package com.lenovo.lcdm.common.enums;

/**
 * common response enum
 *
 * @author
 */
public enum BusinessMsgEnum {
    SUCCESS(200, "success"),
    FAIL(500, "fail")

    ;
    private int code;
    private String message;

    BusinessMsgEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }

    public String formatMsg(Object... args) {
        return String.format(getMessage(), args);
    }
}
